package com.kgdev.cweb.entities.sys;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.kgdev.cweb.entities.ManagedEntity;


/**
 * The persistent class for the srv_icon_repo database table.
 * 
 */
@Entity
@NamedQueries(value = {
		@NamedQuery(name = "Icon.findAll", query = "select i from Icon i")})
@Table(name="sys_icon_repo")
public class Icon implements Serializable, ManagedEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@TableGenerator(name = "SRV_ICN", allocationSize = 1, initialValue = 1, table = "SEQUENCE", 
	valueColumnName = "SEQ_COUNT", pkColumnName = "SEQ_NAME", pkColumnValue = "SRV_ICN")
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "SRV_ICN")
	@Column(name="icon_id", unique=true, nullable=false)
	private Integer iconId;

    @Lob()
	@Column(nullable=false)
	private byte[] content;

	@Column(name="content_type", nullable=false, length=45)
	private String contentType;

	@Column(name="file_name", nullable=false, length=45)
	private String fileName;

    public Icon() {
    }

	public Integer getIconId() {
		return this.iconId;
	}

	public void setIconId(Integer iconId) {
		this.iconId = iconId;
	}

	public byte[] getContent() {
		return this.content;
	}

	public void setContent(byte[] content) {
		this.content = content;
	}

	public String getContentType() {
		return this.contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

}